package com.server.impl;

import com.dao.IMylog;
import com.model.LOG;
import com.model.MyEcharts1;
import com.model.MyEcharts2;
import com.server.MylogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MylogServiceImpl implements MylogService {

    @Autowired
    private IMylog iMylog;

    @Override
    public int addLog(LOG myLog) {
        return iMylog.addMylog(myLog);
    }

    @Override
    public LOG getLog(int userid) {
        return iMylog.getMylog(userid);
    }

    @Override
    public int updateMylog(LOG myLog) {
        return iMylog.updateMylog(myLog);
    }

    @Override
    public int deleteMylog(int userid) {
        return iMylog.deleteMylog(userid);
    }

    @Override
    public List<LOG> getAllMylogs(LOG myLog){
        return iMylog.getAllMylogs(myLog);
    }

    @Override
    public LOG getIdAndTime(int userid) {return iMylog.getIdAndTime(userid); }

    @Override
    public List<MyEcharts1> EchartsMyLogStart(LOG myLog){return iMylog.EchartsMyLogStart(myLog); }

    @Override
    public List<MyEcharts2> EchartsWeeklyTrend(LOG myLog){return iMylog.EchartsWeeklyTrend(myLog); }
}
